package com.lyc.day1103.demo03;

import java.util.function.Function;

/**
 * @author ：Xiaochen
 * @date ：Created in 2022/11/3 21:37
 * @description：
 * @modified By：
 * @version:
 */
public class TestFunction {
    public static void main(String[] args) {
        Function<String,Integer> f=t->t.length();
        fun(f,"hello MrLiu");
    }
    public static void fun(Function<String,Integer> f,String str){
        Integer apply = f.apply(str);
        System.out.println(apply);
    }
}